
package com.zsrt.day20170427.ch01;

/**
 * 禁止使用带参的构造方法  再加一个无参
 * @author jmj
 * @date 2017年4月27日
 * @time 上午11:19:03
 */
public class Student/* extends Person*/{

	private  String name;
	
	private int age ;

	public Student(){}
	
	/**
	 * @param name
	 * @param age
	 */
	public Student(String name, int age) {
		super();
		this.name = name;
		this.age = age;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * @param age the age to set
	 */
	public void setAge(int age) {
		this.age = age;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Student [name=" + name + ", age=" + age + "]";
	}
	
	
	private int add(int a,int b){
		return a+b;
	}
}
